<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <script src="https://unpkg.com/vue@next"></script>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.2.4/gsap.min.js"></script>
  <style>
  </style>
</head>
<body>
  <div id="app">
    <input type="number" v-model.number="number" step="20">
    <p>{{ animatedNumber }}</p>
    <div class="square" style="width: 100px;height:100px;background:red;"></div>
  </div>

  <script>
    const app = Vue.createApp({
      data() {
        return {
          number: 0,
          tweenedNumber: 0
        }
      },
      computed: {
        animatedNumber() {
          return this.tweenedNumber.toFixed(0)
        }
      },
      watch: {
        number(newValue) {
          gsap.to(this.$data, { duration: 0.5, tweenedNumber: newValue })
        }
      },
      mounted() {
        gsap.from('.square', {duration: 1, scale: 2})
      }
    })

    app.mount('#app')
  </script>
</body>
</html>